# -*- coding: utf-8 -*-
import os
import rospy
import time
import requests
import roslaunch

class robotbox():
    # def __init__(self):
        # uuid = roslaunch.rlutil.get_or_generate_uuid(None, False)
        # cli_args = ['/home/jy/billiard/src/ros_box/launch/ros_box.launch',
        #             'planner:=teb', 'open_rviz:=true']
        # roslaunch_args = cli_args[1:]
        # roslaunch_file = [
        #     (roslaunch.rlutil.resolve_launch_arguments(cli_args)[0], roslaunch_args)]
        # self.box_launch = roslaunch.parent.ROSLaunchParent(
        #     uuid, roslaunch_file)
   
    def open(self):
        # self.box_launch.start()
        data = {"method": "box.open", "code": "0", "msg": ""}
        return data

    def close(self):
        # self.box_launch.stop()
        data = {"method": "box.close", "code": "0", "msg": ""}
        return data